<extend name="Base:base" />
<block name="style">
<style type="text/css">
.signup_table{
	width:auto; height:auto; margin:20px;
	background-color:#FFF; overflow:hidden; color:#369;
}
.signup_table td{height:50px; font-size:14px; color:#666; padding:0;}


.textA{width:240px; height:30px; margin:0; padding:0 10px; border:#999 1px solid; border-radius:4px; font-family:'微软雅黑'}
.textA:focus{outline:none; border-color:#9CF; background-color:rgba(153,255,255,0.2); box-shadow:0px 0px 1px #99CCFF;}
</style>
</block>
<block name="maincont">
	<div class="mdtitle">创建用户</div>
	<table class="signup_table" border="0" cellpadding="0" cellspacing="0">
	<form action="index" method="post" id="form_signup"><input type="hidden" name="func" value="newUser">
    <tr><td><input type="text" id="username" name="username" class="textA" placeholder="邮箱名"></td></tr>
    <tr><td><input type="password" id="password" name="password" class="textA" placeholder="密码大于六位"></td></tr>
    <tr><td><input type="password" id="passworda" name="password_1" class="textA" placeholder="密码大于六位"></td></tr>
    <tr><td><input type="button" id="signup_submit" value="创建" class="buttonA"></td></tr>
    </form>
    </table>
</block>

<block name="script">
<script language="javascript">

$("#signup_submit").click(function(){
	var username	= $("#username").val();
	var password	= $("#password").val();
	var passworda	= $("#passworda").val();
	
	var mailForm	= /^[a-zA-Z0-9]+\@[a-zA-Z0-9]+\.[a-zA-Z0-9]+$/;
	if(!mailForm.test(username)){
		alert("抱歉，邮箱格式不正确，请检查!");
	}else if(username == ""||password == ""||passworda == ""){
		alert("请将信息填写完全!");
	}else if(password != passworda){
		alert("两次密码不一致，请检查!");
	}else if(password.length < 6){
		alert("抱歉，密码小于6位！");
	}else{
		$("#form_signup").submit();
	}
});
</script>
</block>